#include "Subject.h"

Subject::~Subject(){
}

void Subject::registerObserver(Observer *ob){
    observers.push_back(ob);
}

void Subject::removeObserver(Observer *ob){
    observers.remove(ob);
}

void Subject::notifyObserves(){
    for (std::list<Observer *>::iterator i=observers.begin(); i!=observers.end(); i++) {
        (*i)->update(this);
    }
}